package org.opu.vcforms.transform_t2d.util.smart_xml;

public class Text implements XmlPart {

    final String text;

    public Text(String text) {
        this.text = text;
    }

    @Override
    public String getText() {
        return text != null ? text : "";
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final Text other = (Text) obj;
        if ((this.text == null) ? (other.text != null) : !this.text.equals(other.text)) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 5;
        hash = 67 * hash + (this.text != null ? this.text.hashCode() : 0);
        return hash;
    }
}
